<html>
<head><meta charset="utf-8"><title>design meeting 2020.04.07 · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html">design meeting 2020.04.07</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="193239347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193239347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193239347">(Apr 07 2020 at 19:54)</a>:</h4>
<p>Hi <span class="user-group-mention" data-user-group-id="692">@WG-traits</span></p>



<a name="193239356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193239356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193239356">(Apr 07 2020 at 19:54)</a>:</h4>
<p>5ish minutes until meeting</p>



<a name="193239367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193239367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193239367">(Apr 07 2020 at 19:54)</a>:</h4>
<p>Topic for today: const in Chalk</p>



<a name="193239443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193239443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193239443">(Apr 07 2020 at 19:55)</a>:</h4>
<p>See <a href="https://hackmd.io/nrhN5A8sR2eY9UdfJTKcJg?both" title="https://hackmd.io/nrhN5A8sR2eY9UdfJTKcJg?both">https://hackmd.io/nrhN5A8sR2eY9UdfJTKcJg?both</a> for meeting agenda and such</p>



<a name="193239707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193239707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193239707">(Apr 07 2020 at 19:57)</a>:</h4>
<p>Before we start, just wanted to give some announcements/shout outs</p>



<a name="193239727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193239727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193239727">(Apr 07 2020 at 19:57)</a>:</h4>
<p>Been a busy last week</p>



<a name="193239873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193239873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193239873">(Apr 07 2020 at 19:58)</a>:</h4>
<p>We currently have <em>10</em> PRs opened</p>



<a name="193239875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193239875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193239875">(Apr 07 2020 at 19:58)</a>:</h4>
<p>Very cool to see all the activity all of a sudden</p>



<a name="193239904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193239904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193239904">(Apr 07 2020 at 19:59)</a>:</h4>
<p>and <em>3</em> that were merged in the last week</p>



<a name="193240046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240046">(Apr 07 2020 at 20:00)</a>:</h4>
<p>But anyways, I know if I start shouting out individual people, I'm gonna miss some</p>



<a name="193240137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240137">(Apr 07 2020 at 20:00)</a>:</h4>
<p>We also have more issues describing the ongoing work now, with assignees which helps to see things at a glance</p>



<a name="193240142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240142">(Apr 07 2020 at 20:00)</a>:</h4>
<p>I actually have 2 more ready, they depend on not-yet-merged ones</p>



<a name="193240209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240209">(Apr 07 2020 at 20:01)</a>:</h4>
<p><span class="user-mention" data-user-id="251766">@Areredify</span> feel free to make a PR for them :) We can always merge in order and/or comment</p>



<a name="193240447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240447">(Apr 07 2020 at 20:03)</a>:</h4>
<p>Sigh, I didn't do any actual <em>prep</em> about constants</p>



<a name="193240456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240456">(Apr 07 2020 at 20:03)</a>:</h4>
<p>Meeting time</p>



<a name="193240457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240457">(Apr 07 2020 at 20:03)</a>:</h4>
<p>but that's ok, let's talk now :)</p>



<a name="193240458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240458">(Apr 07 2020 at 20:03)</a>:</h4>
<p>ha</p>



<a name="193240467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240467">(Apr 07 2020 at 20:03)</a>:</h4>
<p>me neither</p>



<a name="193240485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240485">(Apr 07 2020 at 20:03)</a>:</h4>
<p>mostly because I know little about how consts work in rustc under the hood</p>



<a name="193240533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240533">(Apr 07 2020 at 20:04)</a>:</h4>
<p>it's been...a day</p>



<a name="193240562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240562">(Apr 07 2020 at 20:04)</a>:</h4>
<p>Tuesdays are always a busy day for me</p>



<a name="193240567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240567">(Apr 07 2020 at 20:04)</a>:</h4>
<p>I guess let's start with a few minutes on current status etc?</p>



<a name="193240610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240610">(Apr 07 2020 at 20:04)</a>:</h4>
<p>right, so already covered a bit: lots of activity the last week, nice to see</p>



<a name="193240621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240621">(Apr 07 2020 at 20:04)</a>:</h4>
<p>that is, I'd like to keep updating the agenda hackmd etc so we have some record and can answer the "what's been doing on" questions easily</p>



<a name="193240678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240678">(Apr 07 2020 at 20:05)</a>:</h4>
<p>yep -- what are the areas we've made progress on?</p>



<a name="193240722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240722">(Apr 07 2020 at 20:05)</a>:</h4>
<ul>
<li>some work on the <code>TypeName</code></li>
</ul>



<a name="193240728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240728">(Apr 07 2020 at 20:05)</a>:</h4>
<p>Status about rustc integration: this is getting close. I need to update the <code>ParamsSubtitutor</code>/<code>BoundVarCollector</code> to handle <code>ReEarlyBound</code> and <code>ReNamed</code></p>



<a name="193240732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240732">(Apr 07 2020 at 20:05)</a>:</h4>
<ul>
<li>some work on bult-in traits (<code>Sized</code>)</li>
</ul>



<a name="193240795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240795">(Apr 07 2020 at 20:06)</a>:</h4>
<ul>
<li>work towards removing vec etc</li>
</ul>



<a name="193240802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240802">(Apr 07 2020 at 20:06)</a>:</h4>
<p>I guess I'll drop notes in the hackmd</p>



<a name="193240848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240848">(Apr 07 2020 at 20:06)</a>:</h4>
<p>Sized, Copy, Drop and Clone</p>



<a name="193240891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240891">(Apr 07 2020 at 20:07)</a>:</h4>
<p>nice</p>



<a name="193240926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240926">(Apr 07 2020 at 20:07)</a>:</h4>
<p>on my part, besides reviewing and things, I did some hacking towards towards removing leak check from rustc</p>



<a name="193240941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240941">(Apr 07 2020 at 20:07)</a>:</h4>
<p>Nice</p>



<a name="193240944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193240944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193240944">(Apr 07 2020 at 20:07)</a>:</h4>
<p>now on my third branch and I think I know the right way to do it ;)</p>



<a name="193241007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241007">(Apr 07 2020 at 20:08)</a>:</h4>
<p>The <code>impl Trait</code> work is getting along, I'm hoping to land the current PR soon and iterate on that afterwards (tests, documentation, WF rules and lazy access of hidden types)</p>



<a name="193241022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241022">(Apr 07 2020 at 20:08)</a>:</h4>
<p>one thing I would like: do we know if there are folks looking for tasks who aren't finding them? I can't quite tell, seems like a lot of people were asking</p>



<a name="193241052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241052">(Apr 07 2020 at 20:08)</a>:</h4>
<p>I'm not sure</p>



<a name="193241065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241065">(Apr 07 2020 at 20:08)</a>:</h4>
<p>I <em>think</em> we've got everyone</p>



<a name="193241097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241097">(Apr 07 2020 at 20:09)</a>:</h4>
<p>(if not, speak up :))</p>



<a name="193241105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241105">(Apr 07 2020 at 20:09)</a>:</h4>
<p>OK. Well, people reading this, if you're looking for a task, drop a message in <a class="stream-topic" data-stream-id="144729" href="/#narrow/stream/144729-wg-traits/topic/Contribution.20to.20chalk">#wg-traits &gt; Contribution to chalk</a> I guess :)</p>



<a name="193241144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241144">(Apr 07 2020 at 20:09)</a>:</h4>
<p>I guess let's talk a bit about constants. I wonder if <span class="user-mention" data-user-id="119009">@eddyb</span> or <span class="user-mention" data-user-id="124288">@oli</span> are around.</p>



<a name="193241160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241160">(Apr 07 2020 at 20:09)</a>:</h4>
<p>Or maybe <span class="user-mention" data-user-id="121053">@varkor</span> =)</p>



<a name="193241180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241180">(Apr 07 2020 at 20:09)</a>:</h4>
<p>Yeah, was about to say</p>



<a name="193241184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241184">(Apr 07 2020 at 20:09)</a>:</h4>
<p>/me pings random folks from rustc who do work towards constants</p>



<a name="193241230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241230">(Apr 07 2020 at 20:10)</a>:</h4>
<p>o/</p>



<a name="193241253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241253">(Apr 07 2020 at 20:10)</a>:</h4>
<p>constant police is here <span aria-label="oncoming police car" class="emoji emoji-1f694" role="img" title="oncoming police car">:oncoming_police_car:</span></p>



<a name="193241259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241259">(Apr 07 2020 at 20:10)</a>:</h4>
<p>Maybe we should start with what exactly the <em>problem</em> here. Or, really, what we're trying to accomplish</p>



<a name="193241263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241263">(Apr 07 2020 at 20:10)</a>:</h4>
<p>I can kind of give my high-level view of how things are working and what role chalk ought to play</p>



<a name="193241277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241277">(Apr 07 2020 at 20:10)</a>:</h4>
<p>which <span class="user-mention" data-user-id="119009">@eddyb</span> can correct</p>



<a name="193241301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241301">(Apr 07 2020 at 20:10)</a>:</h4>
<p>the short version is: I hope that chalk can treat constants pretty opaquely</p>



<a name="193241319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241319">(Apr 07 2020 at 20:10)</a>:</h4>
<p>so, obviously they're a third "kind" of parameter (like types, lifetimes)</p>



<a name="193241327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241327">(Apr 07 2020 at 20:10)</a>:</h4>
<p>only <em>known</em> constant values</p>



<a name="193241332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241332">(Apr 07 2020 at 20:11)</a>:</h4>
<p>and adding that is fairly easy</p>



<a name="193241363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241363">(Apr 07 2020 at 20:11)</a>:</h4>
<p>in general, constants are something like "type aliases"</p>



<a name="193241366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241366">(Apr 07 2020 at 20:11)</a>:</h4>
<p>but (const) parameters, inference variables and projections would behave like type ones do</p>



<a name="193241418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241418">(Apr 07 2020 at 20:11)</a>:</h4>
<p>(which includes associated types expressions like <code>Foo::Item</code> in chalk)</p>



<a name="193241495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241495">(Apr 07 2020 at 20:12)</a>:</h4>
<p>in that, to figure out whether two constant expressions are equal, we can sometimes "evaluate" them to a fixed value</p>



<a name="193241496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241496">(Apr 07 2020 at 20:12)</a>:</h4>
<p>So in theory, translating each const to a fresh struct wouldn't really change how chalk handles them (but not like it's useful)</p>



<a name="193241542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241542">(Apr 07 2020 at 20:13)</a>:</h4>
<p>FWIW the values themselves are trees of constructors with integer leaves, so Chalk could also encode them</p>



<a name="193241556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241556">(Apr 07 2020 at 20:13)</a>:</h4>
<p>Oh right, I was mainly thinking of fully-evaluated constants</p>



<a name="193241558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241558">(Apr 07 2020 at 20:13)</a>:</h4>
<p>(anything else is probably unsound :P)</p>



<a name="193241632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241632">(Apr 07 2020 at 20:14)</a>:</h4>
<p>and integers are only included because a type-theoretical <code>Nat</code> is an ADT</p>



<a name="193241650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241650">(Apr 07 2020 at 20:14)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> do you mean anything other than encoding values as trees is unsound?</p>



<a name="193241651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241651">(Apr 07 2020 at 20:14)</a>:</h4>
<p>concrete constant values mirror type constructors <em>perfectly</em> ;)</p>



<a name="193241655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241655">(Apr 07 2020 at 20:14)</a>:</h4>
<p>I think that -- short term at least -- chalk can be generic over constant values, but eventually that might be part of this shared library that defines types</p>



<a name="193241658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241658">(Apr 07 2020 at 20:14)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> likely yes</p>



<a name="193241694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241694">(Apr 07 2020 at 20:15)</a>:</h4>
<p>but constants can also be "associated constants" as well as expressions that have to be evaluated, right?</p>



<a name="193241711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241711">(Apr 07 2020 at 20:15)</a>:</h4>
<p>I guess let's pull up the rustc types</p>



<a name="193241712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241712">(Apr 07 2020 at 20:15)</a>:</h4>
<p>by "tree" I mean the same thing <code>Ty</code> is, the DAG nature is an implementation detail</p>



<a name="193241718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241718">(Apr 07 2020 at 20:15)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> those two are the same</p>



<a name="193241730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241730">(Apr 07 2020 at 20:15)</a>:</h4>
<p>they're both <code>Unevaluated(DefId, Substs)</code></p>



<a name="193241750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241750">(Apr 07 2020 at 20:15)</a>:</h4>
<p>well</p>



<a name="193241762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241762">(Apr 07 2020 at 20:15)</a>:</h4>
<p>in rustc they are, not sure about chalk</p>



<a name="193241772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241772">(Apr 07 2020 at 20:15)</a>:</h4>
<p>there is a difference in that chalk needs to be involved in resolving the trait impls and things</p>



<a name="193241829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241829">(Apr 07 2020 at 20:16)</a>:</h4>
<p>hmm but that's based on what the <code>DefId</code> points to</p>



<a name="193241840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241840">(Apr 07 2020 at 20:16)</a>:</h4>
<p>I guess Chalk doesn't have <code>Instance::resolve</code> verbatim heh</p>



<a name="193241854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241854">(Apr 07 2020 at 20:16)</a>:</h4>
<p>seems fine</p>



<a name="193241868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241868">(Apr 07 2020 at 20:16)</a>:</h4>
<p>at least potentially :)</p>



<a name="193241903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241903">(Apr 07 2020 at 20:17)</a>:</h4>
<p>i.e., if we can ask something like "what -- roughly speaking -- is this def-id" that'd probably be good enough</p>



<a name="193241955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193241955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193241955">(Apr 07 2020 at 20:17)</a>:</h4>
<p>I am imagining this will work similarly -- ultimately -- to how type aliases work</p>



<a name="193242015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242015">(Apr 07 2020 at 20:18)</a>:</h4>
<p>which is to say that unification will produce a subgoal (well, ideally, we'll "preprocess" those, but that's ok) that is like <code>ConstEq(...)</code></p>



<a name="193242058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242058">(Apr 07 2020 at 20:18)</a>:</h4>
<p>that's what I was imagining</p>



<a name="193242061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242061">(Apr 07 2020 at 20:18)</a>:</h4>
<p>anyway so e.g. <code>Some((true, 2))</code> needs an encoding isomorphic to the hypothetical type<br>
<code>Option::Some&lt;(bool::true, S&lt;S&lt;Z&gt;&gt;)&gt;</code></p>



<a name="193242075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242075">(Apr 07 2020 at 20:18)</a>:</h4>
<p>we'll generate clauses that define <code>ConstEq</code> based on impls, so that when you have</p>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">SomeType</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">const</span><span class="w"> </span><span class="n">C</span>: <span class="kt">usize</span> <span class="o">=</span><span class="w"> </span><span class="mi">22</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>


<p>we'd have a <code>NormalizeConst(&lt;SomeType as Foo&gt;::C =&gt; 22)</code> rule</p>



<a name="193242091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242091">(Apr 07 2020 at 20:18)</a>:</h4>
<p>(presumably you wouldn't encode integers using succ's tho :P)</p>



<a name="193242129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242129">(Apr 07 2020 at 20:19)</a>:</h4>
<p>Hope not, only Agda does that</p>



<a name="193242153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242153">(Apr 07 2020 at 20:19)</a>:</h4>
<p>I'm not 100% sure how the 'do true evaluation' part would work; presumably there has to be some sort of callback that lets us try to evaluate</p>



<a name="193242175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242175">(Apr 07 2020 at 20:19)</a>:</h4>
<p>the only thing that Chalk can't know about is how to actually evaluate MIR bodies</p>



<a name="193242237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242237">(Apr 07 2020 at 20:20)</a>:</h4>
<p>in rustc, we have some similar callback, and if the code winds up relying on generic type parameters, it fails, is that right?</p>



<a name="193242256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242256">(Apr 07 2020 at 20:20)</a>:</h4>
<p>yes, it's a bit tricky, but the query returns:</p>



<a name="193242264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242264">(Apr 07 2020 at 20:20)</a>:</h4>
<p>(what's the name of the query?)</p>



<a name="193242269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242269">(Apr 07 2020 at 20:20)</a>:</h4>
<p><code>Result&lt;ConstValue, ErrorReported | TooGeneric&gt;</code></p>



<a name="193242299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242299">(Apr 07 2020 at 20:20)</a>:</h4>
<p><code>const_eval_raw</code> probably but it's a rats' nest</p>



<a name="193242318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242318">(Apr 07 2020 at 20:20)</a>:</h4>
<p><code>ConstValue</code> is a <em>concrete</em> constant, fully evaluated</p>



<a name="193242381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242381">(Apr 07 2020 at 20:22)</a>:</h4>
<p><code>TooGeneric</code> doesn't report inside the constant itself, but the <code>ConstEvaluatable</code> predicate (likely just <code>ConstWellFormed</code> in the future, if I had to guess) errors if a constant can't be proven to evaluate successfully due to <code>TooGeneric</code></p>



<a name="193242463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242463">(Apr 07 2020 at 20:22)</a>:</h4>
<p>the goal, in time, would be to allow definitions to shift the responsibility of this const-WF requirement to their callers</p>



<a name="193242470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242470">(Apr 07 2020 at 20:22)</a>:</h4>
<p>"too generic" meaning -- something depended on an unknown generic type</p>



<a name="193242474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242474">(Apr 07 2020 at 20:22)</a>:</h4>
<p>/me is aiming for a 0 post-monomorphization-error system</p>



<a name="193242492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242492">(Apr 07 2020 at 20:23)</a>:</h4>
<p>or an unknown const generic parameter :P</p>



<a name="193242496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242496">(Apr 07 2020 at 20:23)</a>:</h4>
<p>but this isn't something we can know in advance, prior to evauation</p>



<a name="193242538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242538">(Apr 07 2020 at 20:23)</a>:</h4>
<p>correct, because if you can have <code>if foo { 0 } else { size_of::&lt;T&gt;() }</code></p>



<a name="193242546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242546">(Apr 07 2020 at 20:23)</a>:</h4>
<p>right</p>



<a name="193242623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242623">(Apr 07 2020 at 20:24)</a>:</h4>
<p>and also things that use parameters can still evaluate successfully, e.g. if you know <code>T: Sized</code> then types like <code>&amp;T</code> have a constant size</p>



<a name="193242629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242629">(Apr 07 2020 at 20:24)</a>:</h4>
<p>(without knowing <code>T</code>)</p>



<a name="193242665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242665">(Apr 07 2020 at 20:24)</a>:</h4>
<p>Ah, that's kinda tricky</p>



<a name="193242688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242688">(Apr 07 2020 at 20:24)</a>:</h4>
<p>ok so we're definitely going to want some kind of callback that says "<em>try</em> to evaluate this constant with this substitution"</p>



<a name="193242742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242742">(Apr 07 2020 at 20:25)</a>:</h4>
<p>and if it fails and comes back too generic, that's fine, it's just a dead-end so to speak</p>



<a name="193242743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242743">(Apr 07 2020 at 20:25)</a>:</h4>
<p>yupp, and only WF would actually ever error for <code>TooGeneric</code>, normalization just doesn't replace the unevaluated constant</p>



<a name="193242859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242859">(Apr 07 2020 at 20:26)</a>:</h4>
<p>I think I'm lost</p>



<a name="193242879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242879">(Apr 07 2020 at 20:26)</a>:</h4>
<p>(oops)</p>



<a name="193242882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242882">(Apr 07 2020 at 20:26)</a>:</h4>
<p>You mean that normalization doesn't evaluate too far, if I read that right</p>



<a name="193242914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242914">(Apr 07 2020 at 20:26)</a>:</h4>
<p>normalization evaluates what it can</p>



<a name="193242921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242921">(Apr 07 2020 at 20:26)</a>:</h4>
<p>yeah, I think from chalk's pov there'd be some rule like</p>
<div class="codehilite"><pre><span></span><span class="n">ConstNormalize</span><span class="p">(</span><span class="n">C</span><span class="o">&lt;</span><span class="n">Subst</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="n">C1</span><span class="p">)</span><span class="w"> </span>:<span class="o">-</span><span class="w"></span>
<span class="w">    </span><span class="n">Evaluate</span><span class="p">(</span><span class="n">C</span><span class="o">&lt;</span><span class="n">Subst</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">C2</span><span class="p">),</span><span class="w"> </span><span class="c1">// &lt;-- this is an &quot;intrinsic&quot; that invokes that callback; if TooGeneric is returned, it fails and searches for other applicable rules</span>
<span class="w">    </span><span class="n">C1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">C2</span><span class="w"></span>
</pre></div>



<a name="193242968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242968">(Apr 07 2020 at 20:27)</a>:</h4>
<p>I'm not sure that made things any clearer ;)</p>



<a name="193242995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193242995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193242995">(Apr 07 2020 at 20:27)</a>:</h4>
<p>point is, we'll have some rules that try to invoke that callback. if it succeeds, then they may succeed in proving equality, but else they fail in proving it</p>



<a name="193243011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243011">(Apr 07 2020 at 20:27)</a>:</h4>
<p>chalk never reports errors anyway</p>



<a name="193243013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243013">(Apr 07 2020 at 20:27)</a>:</h4>
<p>WF requires that either the constant fully evaluates <em>or</em> there's something (e.g. a <code>where</code> clause) that guarantees the same WF check will be performed in the users of this definition</p>



<a name="193243096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243096">(Apr 07 2020 at 20:28)</a>:</h4>
<p>And with callback, you mean that chalk calls into rustc (or whatever called chalk), but rustc doesn't really get control back, it just handles that callback and chalk continues on its way, right?</p>



<a name="193243183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243183">(Apr 07 2020 at 20:29)</a>:</h4>
<p>yeah that's fine, WF isn't our problem yet ;)</p>



<a name="193243198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243198">(Apr 07 2020 at 20:29)</a>:</h4>
<p>though it probably will become it</p>



<a name="193243221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243221">(Apr 07 2020 at 20:29)</a>:</h4>
<p>I guess we'd need some concept of "can be evaluated"</p>



<a name="193243244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243244">(Apr 07 2020 at 20:29)</a>:</h4>
<p>I mean chalk is defining the wf rules so it'll have to be able to express them...</p>



<a name="193243281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243281">(Apr 07 2020 at 20:29)</a>:</h4>
<p>"can be evaluated" is not the best, "will evaluate successfully" is probably closer?</p>



<a name="193243284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243284">(Apr 07 2020 at 20:29)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125131">detrumi</span> <a href="#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07/near/193243096" title="#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07/near/193243096">said</a>:</p>
<blockquote>
<p>And with callback, you mean that chalk calls into rustc (or whatever called chalk), but rustc doesn't really get control back, it just handles that callback and chalk continues on its way, right?</p>
</blockquote>
<p>right, just like e.g. the callbacks that fetch a <code>TraitDatum</code> given its def-id and so forth</p>



<a name="193243323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243323">(Apr 07 2020 at 20:30)</a>:</h4>
<p>but...a bit more meaty</p>



<a name="193243377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243377">(Apr 07 2020 at 20:30)</a>:</h4>
<p>ah, which reminds me, <span class="user-mention" data-user-id="119009">@eddyb</span>, does const evaluation ever need to resolve traits? I guess it can</p>



<a name="193243386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243386">(Apr 07 2020 at 20:30)</a>:</h4>
<p>in order to handle associated constants</p>



<a name="193243408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243408">(Apr 07 2020 at 20:30)</a>:</h4>
<p>heh</p>



<a name="193243413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243413">(Apr 07 2020 at 20:30)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07/near/193243281" title="#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07/near/193243281">said</a>:</p>
<blockquote>
<p>"can be evaluated" is not the best, "will evaluate successfully" is probably closer?</p>
</blockquote>
<p>yeah, I want to circle back to that in a bit... to get some better examples</p>



<a name="193243417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243417">(Apr 07 2020 at 20:30)</a>:</h4>
<p>miri is mutually recursive with a lot of rustc</p>



<a name="193243455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243455">(Apr 07 2020 at 20:31)</a>:</h4>
<p>sigh, this seems pretty relevant to the ultimate solver design as well</p>



<a name="193243477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243477">(Apr 07 2020 at 20:31)</a>:</h4>
<p>(I think it actually favors the "recursive solver" design somewhat)</p>



<a name="193243496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243496">(Apr 07 2020 at 20:31)</a>:</h4>
<p>like you can go typeck -&gt; miri -&gt; borrowck -&gt; MIR building -&gt; typeck</p>



<a name="193243531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243531">(Apr 07 2020 at 20:31)</a>:</h4>
<p>uhh, what</p>



<a name="193243543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243543">(Apr 07 2020 at 20:31)</a>:</h4>
<p>yeah but I don't care about that part, from chalk's perspective :)</p>



<a name="193243544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243544">(Apr 07 2020 at 20:31)</a>:</h4>
<p>wow</p>



<a name="193243545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243545">(Apr 07 2020 at 20:31)</a>:</h4>
<p>miri evaluates Rust code</p>



<a name="193243601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243601">(Apr 07 2020 at 20:32)</a>:</h4>
<p>note: those would be doing type-checking and other things on different functions</p>



<a name="193243618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243618">(Apr 07 2020 at 20:32)</a>:</h4>
<p>or constants. "bodies" in general</p>



<a name="193243651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243651">(Apr 07 2020 at 20:32)</a>:</h4>
<p>if e.g. <code>typeck_tables</code> is queried on the same body, that'd be a query cycle error</p>



<a name="193243707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243707">(Apr 07 2020 at 20:33)</a>:</h4>
<p>I was assuming that consts had a known type, so wouldn't need typechecking. Or does typechecking also do some const checks?</p>



<a name="193243740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243740">(Apr 07 2020 at 20:33)</a>:</h4>
<p>sorry, body type-checking</p>



<a name="193243760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243760">(Apr 07 2020 at 20:33)</a>:</h4>
<p>not the signature, the code inside the body</p>



<a name="193243781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243781">(Apr 07 2020 at 20:33)</a>:</h4>
<p><code>const</code> is just a <code>const fn</code> w/o args, really</p>



<a name="193243815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243815">(Apr 07 2020 at 20:34)</a>:</h4>
<p>and this applies for anonymous consts as well</p>



<a name="193243890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243890">(Apr 07 2020 at 20:34)</a>:</h4>
<p>hmm... anyways, where were we</p>



<a name="193243920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243920">(Apr 07 2020 at 20:34)</a>:</h4>
<p>you could probably run Chalk at compile-time in the length const expression for an array type :P</p>



<a name="193243926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243926">(Apr 07 2020 at 20:34)</a>:</h4>
<p>what I mean is, the intermediate steps don't matter too much, but what does matter is if you get a cycle where</p>
<ul>
<li>proving some goal <code>X</code></li>
<li>requires evaluating a constant</li>
<li>which in turn requires proving that same goal <code>X</code></li>
</ul>



<a name="193243928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193243928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193243928">(Apr 07 2020 at 20:34)</a>:</h4>
<p>(eventually)</p>



<a name="193244019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244019">(Apr 07 2020 at 20:35)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> so, unevaluated consts in <code>impl</code> headers?</p>



<a name="193244041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244041">(Apr 07 2020 at 20:35)</a>:</h4>
<p>or I guess <code>where</code> clauses</p>



<a name="193244065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244065">(Apr 07 2020 at 20:36)</a>:</h4>
<p>all the places where they cause query cycles today (if we expose generic parameters in scope to them) w/o lazy normalization :)</p>



<a name="193244163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244163">(Apr 07 2020 at 20:36)</a>:</h4>
<p>I'm not sure it's the same set of places, nor if this is really a problem, but it's something we'll want to dig a bit more into</p>



<a name="193244211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244211">(Apr 07 2020 at 20:37)</a>:</h4>
<p>I mean in some sense it's just an unsatisfiable cycle and that's not unusual</p>



<a name="193244245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244245">(Apr 07 2020 at 20:37)</a>:</h4>
<p>but I always find this  a bit hard to reason about without some good examples</p>



<a name="193244253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244253">(Apr 07 2020 at 20:37)</a>:</h4>
<p>basically <code>Foo: Trait&lt;[(); 123]&gt;</code> matching <code>impl Trait&lt;[(); {complex expr}]&gt; for Foo</code> where the "complex expr" needs to prove <code>Foo: Trait&lt;[(); 123]&gt;</code></p>



<a name="193244338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244338">(Apr 07 2020 at 20:38)</a>:</h4>
<p>I can probably give you an example if you want</p>



<a name="193244351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244351">(Apr 07 2020 at 20:38)</a>:</h4>
<p>right, I mean, that's probably just an error.</p>



<a name="193244375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244375">(Apr 07 2020 at 20:39)</a>:</h4>
<p>examples are helpful</p>



<a name="193244415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244415">(Apr 07 2020 at 20:39)</a>:</h4>
<p>i was going to make a hackmd and start to take down some notes</p>



<a name="193244430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244430">(Apr 07 2020 at 20:39)</a>:</h4>
<p><a href="https://hackmd.io/n0Um5UtyS8md4l9r7B8rCw" title="https://hackmd.io/n0Um5UtyS8md4l9r7B8rCw">hackmd</a></p>



<a name="193244441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244441">(Apr 07 2020 at 20:39)</a>:</h4>
<p>since it seems like we're 40 minutes in and it's time to start collating a bit on what steps we can take</p>



<a name="193244487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244487">(Apr 07 2020 at 20:40)</a>:</h4>
<p>and what to figure out a bit more later on</p>



<a name="193244554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244554">(Apr 07 2020 at 20:40)</a>:</h4>
<p>so, for an initial implementation</p>



<a name="193244563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244563">(Apr 07 2020 at 20:40)</a>:</h4>
<p>do we want to try to get as far as we can <em>without</em> any callbacks?</p>



<a name="193244564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244564">(Apr 07 2020 at 20:40)</a>:</h4>
<p>huh, so that would be a function, with as return type some trait that gets a const expr as argument...</p>



<a name="193244585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244585">(Apr 07 2020 at 20:40)</a>:</h4>
<p>not sure if the extra array wrapping around it really matters here?</p>



<a name="193244594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244594">(Apr 07 2020 at 20:41)</a>:</h4>
<p><a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=251afd8d83250417feead2efbf7638d7" title="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=251afd8d83250417feead2efbf7638d7">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=251afd8d83250417feead2efbf7638d7</a></p>
<div class="codehilite"><pre><span></span>  = note: ...which requires evaluating trait selection obligation `Foo: Trait&lt;[(); 0]&gt;`...
</pre></div>



<a name="193244625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244625">(Apr 07 2020 at 20:41)</a>:</h4>
<p>that example has a trait operation right in the middle of the cycle</p>



<a name="193244637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244637">(Apr 07 2020 at 20:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07/near/193244563" title="#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07/near/193244563">said</a>:</p>
<blockquote>
<p>do we want to try to get as far as we can <em>without</em> any callbacks?</p>
</blockquote>
<p>yeah, this seems good -- I mean the callbacks are only needed to support things like <code>{1+2}</code></p>



<a name="193244660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244660">(Apr 07 2020 at 20:41)</a>:</h4>
<p>i.e., you could also have a perfectly coherent system that had associated constants but the only 'constant values' were literals</p>



<a name="193244666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244666">(Apr 07 2020 at 20:41)</a>:</h4>
<p><span class="user-mention" data-user-id="125131">@detrumi</span> the array makes it compile on stable :P</p>



<a name="193244682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244682">(Apr 07 2020 at 20:42)</a>:</h4>
<p>ah.</p>



<a name="193244791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244791">(Apr 07 2020 at 20:42)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I'd start with parameters, placeholders, etc.</p>



<a name="193244800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244800">(Apr 07 2020 at 20:42)</a>:</h4>
<p>inference variables</p>



<a name="193244805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244805">(Apr 07 2020 at 20:42)</a>:</h4>
<p>right, that's the easy stuff</p>



<a name="193244817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244817">(Apr 07 2020 at 20:43)</a>:</h4>
<p>which is what <span class="user-mention" data-user-id="232957">@Jack Huey</span> was suggesting basically</p>



<a name="193244820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244820">(Apr 07 2020 at 20:43)</a>:</h4>
<p>you can support a subset of const generics without supporting const expressions :P</p>



<a name="193244828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244828">(Apr 07 2020 at 20:43)</a>:</h4>
<p>which makes me quite happy ^_^</p>



<a name="193244834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244834">(Apr 07 2020 at 20:43)</a>:</h4>
<p>cc me on this stuff etc.</p>



<a name="193244854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244854">(Apr 07 2020 at 20:43)</a>:</h4>
<p>I think it should be <em>fairly</em> straightforward to do</p>



<a name="193244870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244870">(Apr 07 2020 at 20:43)</a>:</h4>
<p>and then with that in place we can layer on const expression evaluation</p>



<a name="193244873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244873">(Apr 07 2020 at 20:43)</a>:</h4>
<p>/me has recently been bughunting the implementation of const generics in rustc</p>



<a name="193244878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244878">(Apr 07 2020 at 20:43)</a>:</h4>
<p>seems like a good plan</p>



<a name="193244886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244886">(Apr 07 2020 at 20:43)</a>:</h4>
<p>And it would also make it clear what's left: first support constants in all the right places, and support const expressions later</p>



<a name="193244947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244947">(Apr 07 2020 at 20:44)</a>:</h4>
<p>The definition of constant values, <span class="user-mention" data-user-id="119009">@eddyb</span> -- that's currently in rustc, right? and miri "uses it" from there?</p>



<a name="193244965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244965">(Apr 07 2020 at 20:44)</a>:</h4>
<p>yeah, <code>rustc_middle::mir::interpret</code></p>



<a name="193244971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244971">(Apr 07 2020 at 20:44)</a>:</h4>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/interpret/struct.RawConst.html" title="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/interpret/struct.RawConst.html"><code>RawConst</code></a>?</p>



<a name="193244985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193244985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193244985">(Apr 07 2020 at 20:44)</a>:</h4>
<p><code>ConstValue</code> I would expect?</p>



<a name="193245000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245000">(Apr 07 2020 at 20:45)</a>:</h4>
<p>ah yeah</p>



<a name="193245006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245006">(Apr 07 2020 at 20:45)</a>:</h4>
<p>that looks right</p>



<a name="193245026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245026">(Apr 07 2020 at 20:45)</a>:</h4>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/interpret/enum.ConstValue.html" title="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/interpret/enum.ConstValue.html"><code>ConstValue</code></a></p>



<a name="193245031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245031">(Apr 07 2020 at 20:45)</a>:</h4>
<p>oh yeah the query is something like <code>const_eval_validated</code></p>



<a name="193245059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245059">(Apr 07 2020 at 20:45)</a>:</h4>
<p>Hm, would chalk also need config for what it accepts, for when features are nightly-only for example?</p>



<a name="193245152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245152">(Apr 07 2020 at 20:45)</a>:</h4>
<p>eventually probably</p>



<a name="193245165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245165">(Apr 07 2020 at 20:45)</a>:</h4>
<p>well maybe</p>



<a name="193245169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245169">(Apr 07 2020 at 20:45)</a>:</h4>
<p>sounds similar to what we're expecting with implied bounds</p>



<a name="193245189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245189">(Apr 07 2020 at 20:45)</a>:</h4>
<p>yeah</p>



<a name="193245196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245196">(Apr 07 2020 at 20:45)</a>:</h4>
<p>something funny to me is that chalk-ir could have const generics that are all <code>usize</code>, assuming it already has a notion of array types (but maybe it doesn't?)</p>



<a name="193245216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245216">(Apr 07 2020 at 20:45)</a>:</h4>
<p>I'd like to start with just simple constant values</p>



<a name="193245262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245262">(Apr 07 2020 at 20:46)</a>:</h4>
<p>probably just scalar integers</p>



<a name="193245270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245270">(Apr 07 2020 at 20:46)</a>:</h4>
<p>but really I think this can be part of the <code>Interner</code></p>



<a name="193245274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245274">(Apr 07 2020 at 20:46)</a>:</h4>
<p>my vote is for unsigned integers</p>



<a name="193245280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245280">(Apr 07 2020 at 20:46)</a>:</h4>
<p>at least to start</p>



<a name="193245345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245345">(Apr 07 2020 at 20:46)</a>:</h4>
<p>the new Rust mangling also started off with just unsigned integers</p>



<a name="193245362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245362">(Apr 07 2020 at 20:46)</a>:</h4>
<p><code>I::ConstValue</code> in other words</p>



<a name="193245445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245445">(Apr 07 2020 at 20:46)</a>:</h4>
<p>and then chalk-integration (for unit testing) can just use <code>usize</code></p>



<a name="193245471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245471">(Apr 07 2020 at 20:46)</a>:</h4>
<p>That makes sense</p>



<a name="193245502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245502">(Apr 07 2020 at 20:47)</a>:</h4>
<p>oh is that called <code>chalk-integration</code>? for some reason I had <code>chalk-ir</code> stuck in my head</p>



<a name="193245697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245697">(Apr 07 2020 at 20:47)</a>:</h4>
<p>chalk-ir is the "type library"</p>



<a name="193245702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245702">(Apr 07 2020 at 20:47)</a>:</h4>
<p>chalk-integration is the unit testing harness</p>



<a name="193245714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245714">(Apr 07 2020 at 20:47)</a>:</h4>
<p>more or less</p>



<a name="193245729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245729">(Apr 07 2020 at 20:47)</a>:</h4>
<p>ah I see</p>



<a name="193245731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245731">(Apr 07 2020 at 20:48)</a>:</h4>
<p>rustc would never depend on chalk-integration</p>



<a name="193245736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245736">(Apr 07 2020 at 20:48)</a>:</h4>
<p>Hm, isn't most of const generics about integers?</p>



<a name="193245786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245786">(Apr 07 2020 at 20:48)</a>:</h4>
<p>the usefulness, yeah</p>



<a name="193245848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245848">(Apr 07 2020 at 20:48)</a>:</h4>
<p>yeah, rustc depends on chalk-ir, chalk-solve, and chalk-rust-ir</p>



<a name="193245926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245926">(Apr 07 2020 at 20:48)</a>:</h4>
<p>but they're more flexible than that (well, basically structurally-matcheable ADTs with integer leaves)</p>



<a name="193245935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193245935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193245935">(Apr 07 2020 at 20:48)</a>:</h4>
<p>(in the current PR)</p>



<a name="193246034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246034">(Apr 07 2020 at 20:49)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07/near/193245848" title="#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07/near/193245848">said</a>:</p>
<blockquote>
<p>yeah, rustc depends on chalk-ir, chalk-solve, and chalk-rust-ir</p>
</blockquote>
<p>that sounds right</p>



<a name="193246047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246047">(Apr 07 2020 at 20:49)</a>:</h4>
<p>Ok, this was pretty productive</p>



<a name="193246061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246061">(Apr 07 2020 at 20:49)</a>:</h4>
<p>I guess one question to ask if "when" -- do we want to start spelling out issues, or wait until next sprint :)</p>



<a name="193246128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246128">(Apr 07 2020 at 20:50)</a>:</h4>
<p>I think next sprint</p>



<a name="193246133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246133">(Apr 07 2020 at 20:50)</a>:</h4>
<p>I'm inclined to say "wait", keep focused, but given the rate we're going through things we may need to start spelling out the issues</p>



<a name="193246137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246137">(Apr 07 2020 at 20:50)</a>:</h4>
<p>yeah, me too</p>



<a name="193246148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246148">(Apr 07 2020 at 20:50)</a>:</h4>
<p>is when we make const support in Chalk a goal</p>



<a name="193246161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246161">(Apr 07 2020 at 20:50)</a>:</h4>
<p>I think we can encode some of the steps into the task-tree</p>



<a name="193246171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246171">(Apr 07 2020 at 20:50)</a>:</h4>
<p>here real late :&lt;</p>



<a name="193246180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246180">(Apr 07 2020 at 20:50)</a>:</h4>
<p>btw if anyone is curious <em>why</em> integer leaves: <a href="https://github.com/rust-lang/rust/issues/70889#issuecomment-610565240" title="https://github.com/rust-lang/rust/issues/70889#issuecomment-610565240">https://github.com/rust-lang/rust/issues/70889#issuecomment-610565240</a></p>



<a name="193246186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246186">(Apr 07 2020 at 20:50)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> ^^</p>



<a name="193246202"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246202" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246202">(Apr 07 2020 at 20:50)</a>:</h4>
<p>#rust-offtopic back in the day broke <em>Idris</em></p>



<a name="193246203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246203">(Apr 07 2020 at 20:50)</a>:</h4>
<p>I was wondering <span class="user-mention" data-user-id="220273">@Jane Lusby</span> where you were :)</p>



<a name="193246213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246213">(Apr 07 2020 at 20:50)</a>:</h4>
<p>by shoving floats into types</p>



<a name="193246219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246219">(Apr 07 2020 at 20:50)</a>:</h4>
<p>yea sorry lost track of time</p>



<a name="193246227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246227">(Apr 07 2020 at 20:50)</a>:</h4>
<blockquote>
<p>_&lt;</p>
</blockquote>



<a name="193246253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246253">(Apr 07 2020 at 20:51)</a>:</h4>
<p>did i miss anything relevant to what I've been working on?</p>



<a name="193246257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246257">(Apr 07 2020 at 20:51)</a>:</h4>
<p>i dont have much to report</p>



<a name="193246276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246276">(Apr 07 2020 at 20:51)</a>:</h4>
<p>no, except that <span class="user-mention" data-user-id="251766">@Areredify</span> has done a lot of the built-in trait stuff</p>



<a name="193246290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246290">(Apr 07 2020 at 20:51)</a>:</h4>
<p>which I think you were working on?</p>



<a name="193246303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246303">(Apr 07 2020 at 20:51)</a>:</h4>
<p>okay, yea i saw a lot of that on github</p>



<a name="193246311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246311">(Apr 07 2020 at 20:51)</a>:</h4>
<p>but we can find you some tasks :)</p>



<a name="193246322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246322">(Apr 07 2020 at 20:52)</a>:</h4>
<p>okay</p>



<a name="193246379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246379">(Apr 07 2020 at 20:52)</a>:</h4>
<p>Waiting with const support sounds fine, let's polish the ongoing stuff a bit more first</p>



<a name="193246401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246401">(Apr 07 2020 at 20:52)</a>:</h4>
<p>perhaps an important note:</p>



<a name="193246427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246427">(Apr 07 2020 at 20:52)</a>:</h4>
<p>currently in my PR, for consts I'm just "using" a <code>()</code></p>



<a name="193246520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246520">(Apr 07 2020 at 20:53)</a>:</h4>
<p>PS, while we have you <span class="user-mention" data-user-id="119009">@eddyb</span> -- I want to rename <code>Fold</code> to <code>Map</code> and <code>Visit</code> to <code>Fold</code> (also in rustc), do you agree?</p>



<a name="193246564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246564">(Apr 07 2020 at 20:54)</a>:</h4>
<p>that is, the "type folder" and "type visitor"</p>



<a name="193246586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246586">(Apr 07 2020 at 20:54)</a>:</h4>
<p>I'd keep <code>Visit</code> but <code>Map</code> makes sense</p>



<a name="193246590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246590">(Apr 07 2020 at 20:54)</a>:</h4>
<p>maybe <code>Transform</code>?</p>



<a name="193246617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246617">(Apr 07 2020 at 20:54)</a>:</h4>
<p>The chalk visit is I guess closer to fold than the rustc one</p>



<a name="193246637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246637">(Apr 07 2020 at 20:54)</a>:</h4>
<p>heh</p>



<a name="193246652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246652">(Apr 07 2020 at 20:54)</a>:</h4>
<p>in that it's not hard-coded to "search for something"</p>



<a name="193246673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246673">(Apr 07 2020 at 20:55)</a>:</h4>
<p>On that note, I was wondering</p>



<a name="193246680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246680">(Apr 07 2020 at 20:55)</a>:</h4>
<p>the rustc one could be called <code>Find</code> =)</p>



<a name="193246701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246701">(Apr 07 2020 at 20:55)</a>:</h4>
<p>but I'd like to unify them eventually, which is part of why I'm asking</p>



<a name="193246714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246714">(Apr 07 2020 at 20:55)</a>:</h4>
<p>Can the current <code>Fold</code> just be a type of <code>Visit</code></p>



<a name="193246724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246724">(Apr 07 2020 at 20:55)</a>:</h4>
<p>no</p>



<a name="193246734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246734">(Apr 07 2020 at 20:55)</a>:</h4>
<p>because</p>



<a name="193246738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246738">(Apr 07 2020 at 20:55)</a>:</h4>
<p>IMO <code>Visit</code> with <code>Result</code> returns and associated type Error in the <code>TypeVisitor</code> should be what we do</p>



<a name="193246743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246743">(Apr 07 2020 at 20:55)</a>:</h4>
<p>the result type varies depending on what you are folding</p>



<a name="193246763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246763">(Apr 07 2020 at 20:55)</a>:</h4>
<p><code>TryVisit</code> if you want :P</p>



<a name="193246844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246844">(Apr 07 2020 at 20:56)</a>:</h4>
<p>the basic difference is: <code>Fold</code> (today) keeps the same types (roughly...) as the thing being mapped, whereas <code>Visit</code> (today) processes a single value of type <code>R</code> across all the trees</p>



<a name="193246853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246853">(Apr 07 2020 at 20:56)</a>:</h4>
<p>ah, yeah, so chalk's <code>Fold</code> is fallible</p>



<a name="193246858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246858">(Apr 07 2020 at 20:56)</a>:</h4>
<p>I forget if <code>Visit</code> is</p>



<a name="193246868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246868">(Apr 07 2020 at 20:56)</a>:</h4>
<p>see: <code>try_for_each</code> in <code>Iterator</code></p>



<a name="193246901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246901">(Apr 07 2020 at 20:57)</a>:</h4>
<p>What does a custom derive for Fold mean in wg-traits#16?</p>



<a name="193246909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246909">(Apr 07 2020 at 20:57)</a>:</h4>
<p>I guess not</p>



<a name="193246925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246925">(Apr 07 2020 at 20:57)</a>:</h4>
<p><span class="user-mention silent" data-user-id="251766">Areredify</span> <a href="#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07/near/193246901" title="#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07/near/193246901">said</a>:</p>
<blockquote>
<p>What does a custom derive for Fold mean in wg-traits#16?</p>
</blockquote>
<p>rustc doesn't have one</p>



<a name="193246933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246933">(Apr 07 2020 at 20:57)</a>:</h4>
<p>Ah yeah, okay</p>



<a name="193246935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246935">(Apr 07 2020 at 20:57)</a>:</h4>
<p>I think that's what I was referring to</p>



<a name="193246965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246965">(Apr 07 2020 at 20:57)</a>:</h4>
<p>we have a <code>TypeFoldable</code> derive now I think?</p>



<a name="193246968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246968">(Apr 07 2020 at 20:57)</a>:</h4>
<p>Visit is infallible</p>



<a name="193246975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246975">(Apr 07 2020 at 20:57)</a>:</h4>
<p>we should've added it ages ago but we have it now</p>



<a name="193246984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246984">(Apr 07 2020 at 20:57)</a>:</h4>
<p>ok ok I am out of date :)</p>



<a name="193246989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193246989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193246989">(Apr 07 2020 at 20:57)</a>:</h4>
<p>I didn't see it go by</p>



<a name="193247059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247059">(Apr 07 2020 at 20:58)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="cp">#[derive(Clone, Copy, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)]</span><span class="w"></span>
<span class="cp">#[derive(HashStable, TypeFoldable)]</span><span class="w"></span>
<span class="k">pub</span><span class="w"> </span><span class="k">enum</span> <span class="nc">Predicate</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="193247072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247072">(Apr 07 2020 at 20:58)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I remember pinging you on it :P</p>



<a name="193247090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247090">(Apr 07 2020 at 20:58)</a>:</h4>
<p>lol</p>



<a name="193247114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247114">(Apr 07 2020 at 20:58)</a>:</h4>
<p>I mean.. "of course I remember that"</p>



<a name="193247127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247127">(Apr 07 2020 at 20:59)</a>:</h4>
<p>anyway, <span aria-label="point right" class="emoji emoji-1f449" role="img" title="point right">:point_right:</span> <code>rustc_macros</code></p>



<a name="193247152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247152">(Apr 07 2020 at 20:59)</a>:</h4>
<p>if you want to add more derives (they're super easy to implement, I looked recently at the impl)</p>



<a name="193247355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247355">(Apr 07 2020 at 21:01)</a>:</h4>
<p>that's a sign that rustc picked the right trait to derive, I feel we've had less success with that in chalk</p>



<a name="193247415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247415">(Apr 07 2020 at 21:01)</a>:</h4>
<p>any trait should be easy</p>



<a name="193247471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247471">(Apr 07 2020 at 21:01)</a>:</h4>
<p>judging from the implementation :P</p>



<a name="193247484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247484">(Apr 07 2020 at 21:01)</a>:</h4>
<p>it's not super hard..? but we've got a bit more boilerplate than I'd like</p>



<a name="193247506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247506">(Apr 07 2020 at 21:01)</a>:</h4>
<p>unless there's a lot of corner cases <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="193247577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247577">(Apr 07 2020 at 21:02)</a>:</h4>
<p>well you don't put corner cases in derives :P</p>



<a name="193247588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247588">(Apr 07 2020 at 21:02)</a>:</h4>
<p>you put them in custom impls</p>



<a name="193247594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247594">(Apr 07 2020 at 21:02)</a>:</h4>
<p>in general I think writing derives is a bit harder than it should be, though I suspect <span class="user-mention" data-user-id="119235">@David Tolnay</span> has some super crates I should be using to make it easier</p>



<a name="193247614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247614">(Apr 07 2020 at 21:02)</a>:</h4>
<p>you're not using <code>synstructure</code>?</p>



<a name="193247628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247628">(Apr 07 2020 at 21:02)</a>:</h4>
<p>nah, see, exactly :)</p>



<a name="193247643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247643">(Apr 07 2020 at 21:02)</a>:</h4>
<p>that's a crime <span aria-label="oncoming police car" class="emoji emoji-1f694" role="img" title="oncoming police car">:oncoming_police_car:</span></p>



<a name="193247653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247653">(Apr 07 2020 at 21:02)</a>:</h4>
<p>PRs welcome :)</p>



<a name="193247663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247663">(Apr 07 2020 at 21:02)</a>:</h4>
<p>/me goes to file an issue ...</p>



<a name="193247680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247680">(Apr 07 2020 at 21:03)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/master/src/librustc_macros/src/type_foldable.rs" title="https://github.com/rust-lang/rust/blob/master/src/librustc_macros/src/type_foldable.rs">https://github.com/rust-lang/rust/blob/master/src/librustc_macros/src/type_foldable.rs</a></p>



<a name="193247686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247686">(Apr 07 2020 at 21:03)</a>:</h4>
<p>this is the entire thing</p>



<a name="193247714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247714">(Apr 07 2020 at 21:03)</a>:</h4>
<p>visit is <em>three lines</em> <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_macros/src/type_foldable.rs#L18-L20" title="https://github.com/rust-lang/rust/blob/master/src/librustc_macros/src/type_foldable.rs#L18-L20">https://github.com/rust-lang/rust/blob/master/src/librustc_macros/src/type_foldable.rs#L18-L20</a></p>



<a name="193247722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247722">(Apr 07 2020 at 21:03)</a>:</h4>
<p>Compare that to this: <a href="https://github.com/rust-lang/chalk/blob/master/chalk-derive/src/lib.rs" title="https://github.com/rust-lang/chalk/blob/master/chalk-derive/src/lib.rs">https://github.com/rust-lang/chalk/blob/master/chalk-derive/src/lib.rs</a></p>



<a name="193247743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247743">(Apr 07 2020 at 21:03)</a>:</h4>
<p>fold is <em>nine lines</em> <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_macros/src/type_foldable.rs#L9-L17" title="https://github.com/rust-lang/rust/blob/master/src/librustc_macros/src/type_foldable.rs#L9-L17">https://github.com/rust-lang/rust/blob/master/src/librustc_macros/src/type_foldable.rs#L9-L17</a></p>



<a name="193247755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247755">(Apr 07 2020 at 21:03)</a>:</h4>
<p>and 3 of those are just closing braces :P</p>



<a name="193247808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247808">(Apr 07 2020 at 21:04)</a>:</h4>
<p>Looks very cool, thanks for informing us</p>



<a name="193247888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247888">(Apr 07 2020 at 21:04)</a>:</h4>
<p>part of is it that we've maintained the ability to be generic over things like <code>HasInterner</code></p>



<a name="193247892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247892">(Apr 07 2020 at 21:04)</a>:</h4>
<p>thank <span class="user-mention" data-user-id="248906">@cjgillot</span> :P</p>



<a name="193247904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247904">(Apr 07 2020 at 21:04)</a>:</h4>
<p>but it can definitely be made much nicer...</p>



<a name="193247985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/design%20meeting%202020.04.07/near/193247985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07.html#193247985">(Apr 07 2020 at 21:05)</a>:</h4>
<p>filed <a href="https://github.com/rust-lang/chalk/issues/381" title="https://github.com/rust-lang/chalk/issues/381">https://github.com/rust-lang/chalk/issues/381</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>